import { IRoute } from './types';
import PayRes from './views/order/payRes';
import CartList from './views/carts/cartsList';
import Detail from './views/goodDetail';
import Goods from './views/goods';
import Home from './views/home';
import Login from './views/login';
import Order from './views/order';
import Settlement from './views/settlement';
export const routes: IRoute[] = [
    {
        path: '/login',
        key: '/login',
        Element: Login,
        icon: '',
        name: '登录',
        media: {
            isHide: true,
            isDefault: false,
        },
        children: [],
    },
    {
        path: '/goods',
        key: '/goods',
        Element: Home,
        icon: 'icon-shangpinguanli',
        name: '首页',
        children: [
            {
                path: '',
                key: 'index',
                icon: '',
                Element: Goods,
                name: '',
                children: [],
                media: {
                    isHide: true,
                    isDefault: true,
                },
            },
            {
                path: 'index',
                key: 'index',
                Element: Goods,
                icon: '',
                name: '商品首页',
                children: [],
            },
            {
                path: 'detail/:id/:category',
                key: 'detail',
                Element: Detail,
                icon: '',
                name: '商品详情',
                children: [],
            },
        ],
    },
    {
        path: '/cart',
        key: '/cart',
        Element: Home,
        icon: 'icon-shangpinguanli',
        name: '购物车',
        children: [
            {
                path: '',
                key: 'index',
                icon: '',
                Element: CartList,
                name: '',
                children: [],
                media: {
                    isHide: true,
                    isDefault: true,
                },
            },
            {
                path: 'index',
                key: 'index',
                Element: CartList,
                icon: '',
                name: '购物车列表',
                children: [],
            },
        ],
    },
    {
        path: '/settlement',
        key: '/settlement',
        Element: Home,
        icon: 'icon-shangpinguanli',
        name: '结算',
        children: [
            {
                path: '',
                key: 'index',
                icon: '',
                Element: Settlement,
                name: '',
                children: [],
                media: {
                    isHide: true,
                    isDefault: true,
                },
            },
            {
                path: 'index',
                key: 'index',
                Element: Settlement,
                icon: '',
                name: '结算列表',
                children: [],
            },
        ],
    },
    {
        path: '/order',
        key: '/order',
        Element: Home,
        icon: 'icon-shangpinguanli',
        name: '订单',
        children: [
            {
                path: '',
                key: 'index',
                icon: '',
                Element: Order,
                name: '',
                children: [],
                media: {
                    isHide: true,
                    isDefault: true,
                },
            },
            {
                path: 'index',
                key: 'index',
                Element: Order,
                icon: '',
                name: '订单列表',
                children: [],
            },
            {
                path: 'payRes',
                key: 'payRes',
                Element: PayRes,
                icon: '',
                name: '支付结果',
                children: [],
            },
        ],
    },
];
